//
//  ViewControllerB.m
//  TransValue
//
//  Created by niit on 16/2/25.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewControllerB.h"
#import "ViewControllerA.h"

@interface ViewControllerB ()

@property (weak, nonatomic) IBOutlet UILabel *resultLabel;
@property (weak, nonatomic) IBOutlet UIButton *button;

@end

@implementation ViewControllerB

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    if ([self.username isEqualToString:self.aname]&&[self.password isEqualToString:self.bword])
    {
         self.resultLabel.text = [NSString stringWithFormat:@"用户名:%@密码:%@\n%@",self.username,self.password,                             @"登陆成功"];
        self.button.hidden=NO;
        
    }else{
        self.resultLabel.text = [NSString stringWithFormat:@"用户名:%@密码:%@\n%@",self.username,self.password,                             @"登陆失败"];
    }
}

- (IBAction)cancelBtn:(id)sender
{
    [self dismissViewControllerAnimated:YES completion:nil];
}





@end
